package apt.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "TBORDERDETAIL")
public class OrderDetailBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -6522716391220944638L;
	
	@Id
	@GeneratedValue
	@Column(name = "DetailID")
	private int detailID;
	
	@Column(name = "PRICE")
	private float price;
	
	@Column(name = "QUANTITY")
	private int quantity;
	
	@ManyToOne
	@JoinColumn(name = "dvdID")
	private DVDBean dvdBean;
	
	@ManyToOne
	@JoinColumn(name = "orderID")
	private OrderBean orderBean;

	public OrderDetailBean(float price, int quantity) {
		super();
		this.price = price;
		this.quantity = quantity;
	}

	public OrderDetailBean() {
		// TODO Auto-generated constructor stub
	}
	
	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public DVDBean getDvdBean() {
		return dvdBean;
	}

	public void setDvdBean(DVDBean dvdBean) {
		this.dvdBean = dvdBean;
	}

	public OrderBean getOrderBean() {
		return orderBean;
	}

	public void setOrderBean(OrderBean orderBean) {
		this.orderBean = orderBean;
	}

	public int getDetailID() {
		return detailID;
	}

	public void setDetailID(int detailID) {
		this.detailID = detailID;
	}
	
	
}
